export function isVideo(str: string) {
    let isPass = false
    if (!/.(gif|jpg|jpeg|png|gif|jpg|png|webp|avif)$/i.test(str)) {
        isPass = true
    }
    return isPass
}
/**
 * 预览图片
 * @param {number} index
 * @param {string} imageList
 */
export function imgPreview(index: number, imageList: string[]) {
    // 预览图片
    const imgData: string[] = []
    imageList.forEach((item) => {
        if (!isVideo(item)) {
            imgData.push(item)
        }
    })
    uni.previewImage({
        urls: imgData,
        current: index,
        loop: true,
    })
}
